"""
@File    ：el_repair_config.py
@Author  ：ixiaodu
@Date    ：2024/8/8
@Desc    ：
"""
from selenium.webdriver.common.by import By


# 维修配置界面tab元素
report_type = By.XPATH, "//div[@id='tab-reportType']//span[.='上报类型']"
repair_project = By.XPATH, "//div[@id='tab-repairProject']//span[.='维修项目']"
repair_fee = By.XPATH, "//div[@id='tab-repairFee']//span[.='维修费用']"
fee_config = By.XPATH, "//div[@id='tab-repairFeeConifg']//span[.='支付配置']"
evaluate_config = By.XPATH, "//div[@id='tab-evaluateConifg']//span[.='评价配置']"

# 通用元素
msg = By.XPATH, "/html//div[@role='alert']//h2[@class='el-notification__title']"

# 上报类型页面元素
report_type_add = By.CSS_SELECTOR, ".search-row .search-item:nth-of-type(5) .el-button--primary"
type_name = By.CSS_SELECTOR, "#pane-reportType .el-form-item--small:nth-of-type(3) .el-input__inner"
icon_color = By.CSS_SELECTOR, ".icon-bg-view .icon-bg:nth-of-type(1)"
icon_shape = By.CSS_SELECTOR, ".icon-img-view .icon-img-span:nth-of-type(1) .el-image__inner"
report_type_remark = By.CSS_SELECTOR, "#pane-reportType .el-textarea__inner"
report_type_submit = By.XPATH, "//div//div/div[@role='dialog']//div/button[2]/span[.='确定']"
association_personnel = By.XPATH, '//*[@id="pane-reportType"]/div/div[2]/div/div[1]/div[4]/div[2]/table/tbody/tr/td[7]/div/button[1]/span'
personnel_options = By.CSS_SELECTOR, ".tree-wrap [role='treeitem']:nth-of-type(2) .el-checkbox__inner"
association_personnel_submit = By.XPATH, "//body/div[@class='el-dialog__wrapper']/div[@role='dialog']//div[@class='dialog-footer']/button[2]/span[.='确定']"

# 维修项目页面元素
repair_project_add = By.XPATH, "//div[@class='search-row']/div[6]/div/button/span[.='新增']"
repair_project_report_type = By.CSS_SELECTOR, "div:nth-of-type(3) > .el-form-item__content .el-input__inner"
repair_project_report_type1 = By.CSS_SELECTOR, "[x-placement] li"
repair_project_name = By.CSS_SELECTOR, "#pane-repairProject .el-form-item--small:nth-of-type(4) .el-input__inner"
repair_project_remark = By.CSS_SELECTOR, "#pane-repairProject .el-textarea__inner"
repair_project_submit = By.XPATH, "//div//div/div[@role='dialog']//div/button[2]/span[.='确定']"
go_now = By.XPATH, "//div[@class='el-message-box__btns']/button[2]/span[1]"

# 维修费用页面元素
repair_fee_add = By.XPATH, "//div[@class='search-row']/div[6]/div/button/span[.='新增']"
repair_fee_report_type = By.CSS_SELECTOR, "div:nth-of-type(1) > .el-form-item__content .el-input__inner"
repair_fee_report_type1 = By.CSS_SELECTOR, "[x-placement] li"
repair_fee_repair_project = By.CSS_SELECTOR, "div:nth-of-type(2) > .el-form-item__content .el-input__inner"
repair_fee_repair_project1 = By.CSS_SELECTOR, "[x-placement] .el-select-dropdown__item"
charge_way = By.CSS_SELECTOR, "label:nth-of-type(3) > .el-radio__label"
charge_amount = By.XPATH, "//form/div[4]/div//input[@type='text']"
repair_fee_remark = By.CSS_SELECTOR, "#pane-repairFee .el-textarea__inner"
repair_fee_submit = By.XPATH, "//div//div/div[@role='dialog']//div/button[2]/span[.='确定']"

# 支付配置页面元素
associated_room = By.XPATH, "//div[@class='el-table__fixed-right']/div/table/tbody/tr[1]/td[3]//button[@type='button']/span[.='关联房间']"
select_all_room = By.CSS_SELECTOR, ".handle-list .el-checkbox__label"
associated_room_submit = By.XPATH, "//div//div/div[@role='dialog']//div/button[2]/span[.='确定']"

# 评价配置页面元素
evaluate_config_add = By.CSS_SELECTOR, ".search-row .search-item:nth-of-type(5) span"
evaluate_dimension = By.CSS_SELECTOR, ".el-form-item--small:nth-of-type(1) .el-input__inner"
evaluate_content1 = By.CSS_SELECTOR, ".el-form-item--small:nth-of-type(2) .el-input__inner"
evaluate_content_add = By.CSS_SELECTOR, ".input-view.el-button--default"
evaluate_content2 = By.CSS_SELECTOR, ".el-form-item--small:nth-of-type(3) .el-input__inner"
evaluate_content_status = By.CSS_SELECTOR, "label:nth-of-type(1) > .el-radio-button__inner"
evaluate_config_submit = By.XPATH, "//div/div[2]/div[@role='dialog']//div/button[2]/span[.='确定']"
